package com.zenni.core;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

/**
 * Created by douglasj on 2/14/16.
 */

public class EditConfig {

    private static Properties config;
    static void init(){

        config = new  Properties();
        try {
            config.load(new FileInputStream("./config.properties"));

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getProperty(String key){
        if(config == null){
            init();
        }
        return config.getProperty(key);
    }

}
